#ifndef SQLIMAGEVIEW_H
#define SQLIMAGEVIEW_H

#include <QTableView>

class SqlImageView : public QTableView
{
    Q_OBJECT
public:
    explicit SqlImageView(QWidget *parent = 0);

signals:
    void viewImages(const QModelIndexList &indexes);
    void sendImages(const QModelIndexList &indexes);
    void exportImages(const QModelIndexList &indexes);
    void removeImages(const QModelIndexList &indexes);

public slots:
    void onViewImages() {emit viewImages(selectedIndexes());}
    void onSendImages() {emit sendImages(selectedIndexes());}
    void onExportImages() {emit exportImages(selectedIndexes());}
    void onRemoveImages();

protected:
    void contextMenuEvent(QContextMenuEvent *e);

private:
    void setupContextMenu();
    QMenu *contextMenu;

    QAction *viewImageAction;
    QAction *sendImageAction;
    QAction *exportImageAction;
    QAction *removeImageAction;
};

#endif // SQLIMAGEVIEW_H
